package com.ai.service.impl;

import cn.hutool.core.util.StrUtil;
import com.ai.common.ConversationTemplates;
import com.ai.entity.dto.CallAndPatient;
import com.ai.service.AiService;
import com.ai.util.OpenAiUtil;
import com.ai.util.ReadOrWriteFileUtil;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 41636
 */
@Service
public class AiServiceImpl implements AiService {
    @Override
    public String modelA(CallAndPatient callAndPatient) {
        String start = StrUtil.format(ConversationTemplates.templateA, callAndPatient.getName(), callAndPatient.getTransText(), callAndPatient.getName());
        return OpenAiUtil.sendToOpenAi(start,callAndPatient.getName());
    }

    @Override
    public String modelB(CallAndPatient callAndPatient) {
        String start = StrUtil.format(ConversationTemplates.templateB, callAndPatient.getName(), callAndPatient.getTransText());
        return OpenAiUtil.sendToOpenAi(start,callAndPatient.getName());
    }

    @Override
    public String modelC(CallAndPatient callAndPatient) {
        String start = StrUtil.format(ConversationTemplates.templateC, callAndPatient.getName(), callAndPatient.getTransText());
        return OpenAiUtil.sendToOpenAi(start,callAndPatient.getName());
    }
}
